package com.youyi.yyviewsdklibrary.View.searchview;

import android.content.Context;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.Point;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.design.widget.TabLayout;
import android.support.v4.widget.ImageViewCompat;
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.util.AttributeSet;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.widget.EditText;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.TextView;
import com.lkx.liandianqinew.R;
import com.youyi.yyviewsdklibrary.View.searchview.utils.ContextUtils;
import com.youyi.yyviewsdklibrary.View.searchview.utils.DimensUtils;
import com.youyi.yyviewsdklibrary.View.searchview.utils.EditTextReflectionUtils;
import com.youyi.yyviewsdklibrary.View.searchview.utils.SimpleAnimationListener;
import com.youyi.yyviewsdklibrary.View.searchview.utils.SimpleAnimationUtils;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;

public class YYTitleSearchView extends FrameLayout {
    public static final int ANIMATION_CENTER_PADDING = 26;
    private static final float BACK_ICON_ALPHA_DEFAULT = 0.87f;
    public static final int CARD_CORNER_RADIUS = 4;
    private static final int CARD_ELEVATION = 2;
    private static final int CARD_PADDING = 6;
    private static final float ICONS_ALPHA_DEFAULT = 0.54f;
    public static final int REQUEST_VOICE_SEARCH = 735;
    public static final int STYLE_BAR = 0;
    public static final int STYLE_CARD = 1;
    private boolean allowVoiceSearch;
    private int animationDuration;
    private ImageView backButton;
    private ImageView clearButton;
    private Context context;
    private boolean isClearingFocus;
    private boolean isSearchOpen;
    private boolean keepQuery;
    private CharSequence oldQuery;
    private OnQueryTextListener onQueryChangeListener;
    private CharSequence query;
    private Point revealAnimationCenter;
    private ViewGroup searchContainer;
    private EditText searchEditText;
    private boolean searchIsClosing;
    private SearchViewListener searchViewListener;
    private int style;
    private TabLayout tabLayout;
    private int tabLayoutInitialHeight;
    private String voiceSearchPrompt;

    public interface OnQueryTextListener {
        boolean onQueryTextChange(String str);

        boolean onQueryTextCleared();

        boolean onQueryTextSubmit(String str);
    }

    public interface SearchViewListener {
        void onSearchViewClosed();

        void onSearchViewClosedAnimation();

        void onSearchViewShown();

        void onSearchViewShownAnimation();
    }

    @Retention(RetentionPolicy.SOURCE)
    public @interface Style {
    }

    public YYTitleSearchView(Context context2) {
        this(context2, null);
    }

    public YYTitleSearchView(Context context2, AttributeSet attributeSet) {
        this(context2, attributeSet, 0);
    }

    public YYTitleSearchView(Context context2, AttributeSet attributeSet, int i) {
        super(context2, attributeSet, i);
        this.animationDuration = 250;
        this.allowVoiceSearch = false;
        this.isSearchOpen = false;
        this.isClearingFocus = false;
        this.voiceSearchPrompt = "";
        this.style = 0;
        this.searchIsClosing = false;
        this.keepQuery = false;
        this.context = context2;
        inflate();
        initStyle(attributeSet, i);
        initSearchEditText();
        initClickListeners();
        if (!isInEditMode()) {
            setVisibility(View.INVISIBLE);
        }
    }

    private void inflate() {
        LayoutInflater.from(this.context).inflate(R.layout._title_yy_search_view, (ViewGroup) this, true);
        this.searchContainer = (ViewGroup) findViewById(R.id.searchContainer);
        this.searchEditText = (EditText) findViewById(R.id.searchEditText);
        this.backButton = (ImageView) findViewById(R.id.buttonBack);
        this.clearButton = (ImageView) findViewById(R.id.buttonClear);
    }

    private void initStyle(AttributeSet attributeSet, int i) {
//        TypedArray obtainStyledAttributes = this.context.obtainStyledAttributes(attributeSet, R.styleable.YYTitleSearchView, i, 0);
//        if (obtainStyledAttributes == null) {
//            setCardStyle(this.style);
//            return;
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_type)) {
//            setCardStyle(obtainStyledAttributes.getInt(R.styleable.YYTitleSearchView_type, this.style));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_backIconAlpha)) {
//            setBackIconAlpha(obtainStyledAttributes.getFloat(R.styleable.YYTitleSearchView_backIconAlpha, BACK_ICON_ALPHA_DEFAULT));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_iconsAlpha)) {
//            setIconsAlpha(obtainStyledAttributes.getFloat(R.styleable.YYTitleSearchView_iconsAlpha, ICONS_ALPHA_DEFAULT));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_backIconTint)) {
//            setBackIconColor(obtainStyledAttributes.getColor(R.styleable.YYTitleSearchView_backIconTint, ContextUtils.getPrimaryColor(this.context)));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_iconsTint)) {
//            setIconsColor(obtainStyledAttributes.getColor(R.styleable.YYTitleSearchView_iconsTint, -16777216));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_cursorColor)) {
//            setCursorColor(obtainStyledAttributes.getColor(R.styleable.YYTitleSearchView_cursorColor, ContextUtils.getAccentColor(this.context)));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_hintColor)) {
//            setHintTextColor(obtainStyledAttributes.getColor(R.styleable.YYTitleSearchView_hintColor, getResources().getColor(R.color.default_textColorHint)));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_searchBackground)) {
//            setSearchBackground(obtainStyledAttributes.getDrawable(R.styleable.YYTitleSearchView_searchBackground));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_searchBackIcon)) {
//            setBackIconDrawable(obtainStyledAttributes.getDrawable(R.styleable.YYTitleSearchView_searchBackIcon));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_searchClearIcon)) {
//            setClearIconDrawable(obtainStyledAttributes.getDrawable(R.styleable.YYTitleSearchView_searchClearIcon));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_voiceSearch)) {
//            enableVoiceSearch(obtainStyledAttributes.getBoolean(R.styleable.YYTitleSearchView_voiceSearch, this.allowVoiceSearch));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_voiceSearchPrompt)) {
//            setVoiceSearchPrompt(obtainStyledAttributes.getString(R.styleable.YYTitleSearchView_voiceSearchPrompt));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_searchHint)) {
//            setHint(obtainStyledAttributes.getString(R.styleable.YYTitleSearchView_searchHint));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_searchInputType)) {
//            setInputType(obtainStyledAttributes.getInt(R.styleable.YYTitleSearchView_searchInputType, 524288));
//        }
//        if (obtainStyledAttributes.hasValue(R.styleable.YYTitleSearchView_searchTextColor)) {
//            setTextColor(obtainStyledAttributes.getColor(R.styleable.YYTitleSearchView_searchTextColor, getResources().getColor(R.color.default_textColor)));
//        }
//        obtainStyledAttributes.recycle();
    }

    private void initSearchEditText() {
        this.searchEditText.setOnEditorActionListener(new TextView.OnEditorActionListener() {
            /* class com.youyi.yyviewsdklibrary.View.searchview.YYTitleSearchView.AnonymousClass1 */

            public boolean onEditorAction(TextView textView, int i, KeyEvent keyEvent) {
                YYTitleSearchView.this.onSubmitQuery();
                return true;
            }
        });
        this.searchEditText.addTextChangedListener(new TextWatcher() {
            /* class com.youyi.yyviewsdklibrary.View.searchview.YYTitleSearchView.AnonymousClass2 */

            public void afterTextChanged(Editable editable) {
            }

            public void beforeTextChanged(CharSequence charSequence, int i, int i2, int i3) {
            }

            public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
                if (!YYTitleSearchView.this.searchIsClosing) {
                    YYTitleSearchView.this.onTextChanged(charSequence);
                }
            }
        });
        this.searchEditText.setOnFocusChangeListener(new OnFocusChangeListener() {
            /* class com.youyi.yyviewsdklibrary.View.searchview.YYTitleSearchView.AnonymousClass3 */

            public void onFocusChange(View view, boolean z) {
                if (z) {
                    ContextUtils.showKeyboard(YYTitleSearchView.this.searchEditText);
                }
            }
        });
    }

    private void initClickListeners() {
        this.backButton.setOnClickListener(new OnClickListener() {
            /* class com.youyi.yyviewsdklibrary.View.searchview.YYTitleSearchView.AnonymousClass4 */

            public void onClick(View view) {
                YYTitleSearchView.this.closeSearch();
            }
        });
        this.clearButton.setOnClickListener(new OnClickListener() {
            /* class com.youyi.yyviewsdklibrary.View.searchview.YYTitleSearchView.AnonymousClass5 */

            public void onClick(View view) {
                YYTitleSearchView.this.clearSearch();
            }
        });
    }

    public void clearFocus() {
        this.isClearingFocus = true;
        ContextUtils.hideKeyboard(this);
        super.clearFocus();
        this.searchEditText.clearFocus();
        this.isClearingFocus = false;
    }

    public boolean requestFocus(int i, Rect rect) {
        if (!this.isClearingFocus && isFocusable()) {
            return this.searchEditText.requestFocus(i, rect);
        }
        return false;
    }

    public Parcelable onSaveInstanceState() {
        SavedState savedState = new SavedState(super.onSaveInstanceState());
        CharSequence charSequence = this.query;
        savedState.query = charSequence != null ? charSequence.toString() : null;
        savedState.isSearchOpen = this.isSearchOpen;
        savedState.animationDuration = this.animationDuration;
        savedState.keepQuery = this.keepQuery;
        return savedState;
    }

    public void onRestoreInstanceState(Parcelable parcelable) {
        if (!(parcelable instanceof SavedState)) {
            super.onRestoreInstanceState(parcelable);
            return;
        }
        SavedState savedState = (SavedState) parcelable;
        this.query = savedState.query;
        this.animationDuration = savedState.animationDuration;
        this.voiceSearchPrompt = savedState.voiceSearchPrompt;
        this.keepQuery = savedState.keepQuery;
        if (savedState.isSearchOpen) {
            showSearch(false);
            setQuery(savedState.query, false);
        }
        super.onRestoreInstanceState(savedState.getSuperState());
    }

    /* access modifiers changed from: private */
    /* access modifiers changed from: public */
    private void clearSearch() {
        this.searchEditText.setText((CharSequence) null);
        OnQueryTextListener onQueryTextListener = this.onQueryChangeListener;
        if (onQueryTextListener != null) {
            onQueryTextListener.onQueryTextCleared();
        }
    }

    /* access modifiers changed from: private */
    /* access modifiers changed from: public */
    private void onTextChanged(CharSequence charSequence) {
        this.query = charSequence;
        if (!TextUtils.isEmpty(charSequence)) {
            this.clearButton.setVisibility(View.VISIBLE);
        } else {
            this.clearButton.setVisibility(View.GONE);
        }
        if (this.onQueryChangeListener != null && !TextUtils.equals(charSequence, this.oldQuery)) {
            this.onQueryChangeListener.onQueryTextChange(charSequence.toString());
        }
        this.oldQuery = charSequence.toString();
    }

    /* access modifiers changed from: private */
    /* access modifiers changed from: public */
    private void onSubmitQuery() {
        Editable text = this.searchEditText.getText();
        if (text != null && TextUtils.getTrimmedLength(text) > 0) {
            OnQueryTextListener onQueryTextListener = this.onQueryChangeListener;
            if (onQueryTextListener == null || !onQueryTextListener.onQueryTextSubmit(text.toString())) {
                closeSearch();
                this.searchIsClosing = true;
                this.searchEditText.setText((CharSequence) null);
                this.searchIsClosing = false;
            }
        }
    }

    private boolean isVoiceAvailable() {
        if (isInEditMode()) {
            return true;
        }
        return !getContext().getPackageManager().queryIntentActivities(new Intent("android.speech.action.RECOGNIZE_SPEECH"), 0).isEmpty();
    }

    public void setKeepQuery(boolean z) {
        this.keepQuery = z;
    }

    public void showSearch() {
        showSearch(true);
    }

    public void showSearch(boolean z) {
        if (!isSearchOpen()) {
            this.searchEditText.setText(this.keepQuery ? this.query : null);
            this.searchEditText.requestFocus();
            if (z) {
                SimpleAnimationUtils.revealOrFadeIn(this, this.animationDuration, new SimpleAnimationListener() {
                    /* class com.youyi.yyviewsdklibrary.View.searchview.YYTitleSearchView.AnonymousClass6 */

                    @Override // com.youyi.yyviewsdklibrary.View.searchview.utils.SimpleAnimationListener, com.youyi.yyviewsdklibrary.View.searchview.utils.SimpleAnimationUtils.AnimationListener
                    public boolean onAnimationEnd(View view) {
                        if (YYTitleSearchView.this.searchViewListener == null) {
                            return false;
                        }
                        YYTitleSearchView.this.searchViewListener.onSearchViewShownAnimation();
                        return false;
                    }
                }, getRevealAnimationCenter()).start();
            } else {
                setVisibility(View.VISIBLE);
            }
            hideTabLayout(z);
            this.isSearchOpen = true;
            SearchViewListener searchViewListener2 = this.searchViewListener;
            if (searchViewListener2 != null) {
                searchViewListener2.onSearchViewShown();
            }
        }
    }

    public void closeSearch() {
        closeSearch(true);
    }

    public void closeSearch(boolean z) {
        if (isSearchOpen()) {
            this.searchIsClosing = true;
            this.searchEditText.setText((CharSequence) null);
            this.searchIsClosing = false;
            clearFocus();
            if (z) {
                SimpleAnimationUtils.hideOrFadeOut(this, this.animationDuration, new SimpleAnimationListener() {
                    /* class com.youyi.yyviewsdklibrary.View.searchview.YYTitleSearchView.AnonymousClass7 */

                    @Override // com.youyi.yyviewsdklibrary.View.searchview.utils.SimpleAnimationListener, com.youyi.yyviewsdklibrary.View.searchview.utils.SimpleAnimationUtils.AnimationListener
                    public boolean onAnimationEnd(View view) {
                        if (YYTitleSearchView.this.searchViewListener == null) {
                            return false;
                        }
                        YYTitleSearchView.this.searchViewListener.onSearchViewClosedAnimation();
                        return false;
                    }
                }, getRevealAnimationCenter()).start();
            } else {
                setVisibility(View.INVISIBLE);
            }
            showTabLayout(z);
            this.isSearchOpen = false;
            SearchViewListener searchViewListener2 = this.searchViewListener;
            if (searchViewListener2 != null) {
                searchViewListener2.onSearchViewClosed();
            }
        }
    }

    public TabLayout getTabLayout() {
        return this.tabLayout;
    }

    public void setTabLayout(final TabLayout tabLayout2) {
        this.tabLayout = tabLayout2;
        tabLayout2.getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
            /* class com.youyi.yyviewsdklibrary.View.searchview.YYTitleSearchView.AnonymousClass8 */

            public boolean onPreDraw() {
                YYTitleSearchView.this.tabLayoutInitialHeight = tabLayout2.getHeight();
                tabLayout2.getViewTreeObserver().removeOnPreDrawListener(this);
                return true;
            }
        });
        this.tabLayout.addOnTabSelectedListener( new SimpleOnTabSelectedListener() {
            /* class com.youyi.yyviewsdklibrary.View.searchview.YYTitleSearchView.AnonymousClass9 */

            @Override // com.youyi.yyviewsdklibrary.View.searchview.SimpleOnTabSelectedListener, android.support.design.widget.TabLayout.OnTabSelectedListener
            public void onTabUnselected(TabLayout.Tab tab) {
                YYTitleSearchView.this.closeSearch();
            }
        });
    }

    public void showTabLayout() {
        showTabLayout(true);
    }

    public void showTabLayout(boolean z) {
        TabLayout tabLayout2 = this.tabLayout;
        if (tabLayout2 != null) {
            if (z) {
                SimpleAnimationUtils.verticalSlideView(tabLayout2, 0, this.tabLayoutInitialHeight, this.animationDuration).start();
            } else {
                tabLayout2.setVisibility(View.VISIBLE);
            }
        }
    }

    public void hideTabLayout() {
        hideTabLayout(true);
    }

    public void hideTabLayout(boolean z) {
        TabLayout tabLayout2 = this.tabLayout;
        if (tabLayout2 != null) {
            if (z) {
                SimpleAnimationUtils.verticalSlideView(tabLayout2, tabLayout2.getHeight(), 0, this.animationDuration).start();
            } else {
                tabLayout2.setVisibility(View.GONE);
            }
        }
    }

    public boolean onBackPressed() {
        if (!isSearchOpen()) {
            return false;
        }
        closeSearch();
        return true;
    }

    public boolean onActivityResult(int i, int i2, Intent intent) {
        return onActivityResult(i, i2, intent, true);
    }

    public boolean onActivityResult(int i, int i2, Intent intent, boolean z) {
        if (i != 735 || i2 != -1) {
            return false;
        }
        ArrayList<String> stringArrayListExtra = intent.getStringArrayListExtra("android.speech.extra.RESULTS");
        if (stringArrayListExtra == null || stringArrayListExtra.isEmpty()) {
            return true;
        }
        String str = stringArrayListExtra.get(0);
        if (TextUtils.isEmpty(str)) {
            return true;
        }
        setQuery(str, z);
        return true;
    }

    public int getCardStyle() {
        return this.style;
    }

    public void setCardStyle(int i) {
        float f;
        this.style = i;
        LayoutParams layoutParams = new LayoutParams(-1, -1);
        if (i != 1) {
            this.searchContainer.setBackgroundColor(-1);
            f = 0.0f;
        } else {
            this.searchContainer.setBackground(getCardStyleBackground());
            int convertDpToPx = DimensUtils.convertDpToPx(6, this.context);
            layoutParams.setMargins(convertDpToPx, convertDpToPx, convertDpToPx, convertDpToPx);
            f = (float) DimensUtils.convertDpToPx(2, this.context);
        }
        this.searchContainer.setLayoutParams(layoutParams);
        if (Build.VERSION.SDK_INT >= 21) {
            this.searchContainer.setElevation(f);
        }
    }

    private GradientDrawable getCardStyleBackground() {
        GradientDrawable gradientDrawable = new GradientDrawable();
        gradientDrawable.setColor(-1);
        gradientDrawable.setCornerRadius((float) DimensUtils.convertDpToPx(4, this.context));
        return gradientDrawable;
    }

    public void setIconsAlpha(float f) {
        this.clearButton.setAlpha(f);
    }

    public void setIconsColor(int i) {
        ImageViewCompat.setImageTintList(this.clearButton, ColorStateList.valueOf(i));
    }

    public void setBackIconAlpha(float f) {
        this.backButton.setAlpha(f);
    }

    public void setBackIconColor(int i) {
        ImageViewCompat.setImageTintList(this.backButton, ColorStateList.valueOf(i));
    }

    public void setBackIconDrawable(Drawable drawable) {
        this.backButton.setImageDrawable(drawable);
    }

    public void setClearIconDrawable(Drawable drawable) {
        this.clearButton.setImageDrawable(drawable);
    }

    public void setSearchBackground(Drawable drawable) {
        this.searchContainer.setBackground(drawable);
    }

    public void setTextColor(int i) {
        this.searchEditText.setTextColor(i);
    }

    public void setHintTextColor(int i) {
        this.searchEditText.setHintTextColor(i);
    }

    public void setHint(CharSequence charSequence) {
        this.searchEditText.setHint(charSequence);
    }

    public void setInputType(int i) {
        this.searchEditText.setInputType(i);
    }

    public void setCursorDrawable(int i) {
        EditTextReflectionUtils.setCursorDrawable(this.searchEditText, i);
    }

    public void setCursorColor(int i) {
        EditTextReflectionUtils.setCursorColor(this.searchEditText, i);
    }

    public void enableVoiceSearch(boolean z) {
        this.allowVoiceSearch = z;
    }

    public EditText getSearchEditText() {
        return this.searchEditText;
    }

    public void setQuery(CharSequence charSequence, boolean z) {
        this.searchEditText.setText(charSequence);
        if (charSequence != null) {
            EditText editText = this.searchEditText;
            editText.setSelection(editText.length());
            this.query = charSequence;
        }
        if (z && !TextUtils.isEmpty(charSequence)) {
            onSubmitQuery();
        }
    }

    public void setMenuItem(MenuItem menuItem) {
        menuItem.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
            /* class com.youyi.yyviewsdklibrary.View.searchview.YYTitleSearchView.AnonymousClass10 */

            public boolean onMenuItemClick(MenuItem menuItem) {
                YYTitleSearchView.this.showSearch();
                return true;
            }
        });
    }

    public boolean isSearchOpen() {
        return this.isSearchOpen;
    }

    public int getAnimationDuration() {
        return this.animationDuration;
    }

    public void setAnimationDuration(int i) {
        this.animationDuration = i;
    }

    public Point getRevealAnimationCenter() {
        Point point = this.revealAnimationCenter;
        if (point != null) {
            return point;
        }
        Point point2 = new Point(getWidth() - DimensUtils.convertDpToPx(26, this.context), getHeight() / 2);
        this.revealAnimationCenter = point2;
        return point2;
    }

    public void setRevealAnimationCenter(Point point) {
        this.revealAnimationCenter = point;
    }

    public void setOnQueryTextListener(OnQueryTextListener onQueryTextListener) {
        this.onQueryChangeListener = onQueryTextListener;
    }

    public void setOnSearchViewListener(SearchViewListener searchViewListener2) {
        this.searchViewListener = searchViewListener2;
    }

    public void setVoiceSearchPrompt(String str) {
        this.voiceSearchPrompt = str;
    }

    /* access modifiers changed from: package-private */
    public static class SavedState extends BaseSavedState {
        public static final Creator<SavedState> CREATOR = new Creator<SavedState>() {
            /* class com.youyi.yyviewsdklibrary.View.searchview.YYTitleSearchView.SavedState.AnonymousClass1 */

            @Override // android.os.Parcelable.Creator
            public SavedState createFromParcel(Parcel parcel) {
                return new SavedState(parcel);
            }

            @Override // android.os.Parcelable.Creator
            public SavedState[] newArray(int i) {
                return new SavedState[i];
            }
        };
        int animationDuration;
        boolean isSearchOpen;
        boolean keepQuery;
        String query;
        String voiceSearchPrompt;

        SavedState(Parcelable parcelable) {
            super(parcelable);
        }

        private SavedState(Parcel parcel) {
            super(parcel);
            this.query = parcel.readString();
            boolean z = false;
            this.isSearchOpen = parcel.readInt() == 1;
            this.animationDuration = parcel.readInt();
            this.voiceSearchPrompt = parcel.readString();
            this.keepQuery = parcel.readInt() == 1 ? true : z;
        }

        public void writeToParcel(Parcel parcel, int i) {
            super.writeToParcel(parcel, i);
            parcel.writeString(this.query);
            parcel.writeInt(this.isSearchOpen ? 1 : 0);
            parcel.writeInt(this.animationDuration);
            parcel.writeString(this.voiceSearchPrompt);
            parcel.writeInt(this.keepQuery ? 1 : 0);
        }
    }
}
